import java.util.Date;
import java.util.Objects;

public class User {
    private String name;
    private int age;
    private Date time;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;

        if (!(obj instanceof User)) return false;
        User user = (User) obj;
        return age == user.age && name.equals(user.name) && time.equals(user.time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name,age,time);
    }


    //    @Override
//    public boolean equals(Object o) {
//        if (this == o) return true;
//        if (!(o instanceof User)) return false;
//        User user = (User) o;
//        return age == user.age && name.equals(user.name) && time.equals(user.time);
//    }
//
//    @Override
//    public int hashCode() {
//        return Objects.hash(name, age, time);
//    }
}
